package com.loadmore.oneday.adapter

import android.content.Context
import com.loadmore.common.base.BaseAdapter
import com.loadmore.common.base.RVBaseHolder
import com.loadmore.oneday.R
import com.loadmore.stepcount.Step

class SportListAdapter(context: Context) :BaseAdapter(context) {
    override fun getLayoutId(): Int {
        return R.layout.layout_sport_item
    }

    override fun onBindViewHolder(holder: RVBaseHolder<*>, position: Int) {
        val step = getItem(position) as Step
        holder.setImage(context,R.id.icon,step.user.avatar).setText(R.id.user_name,step.user.name)
                .setText(R.id.step_count,step.step.toString())
    }

}